home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Utilities / Explorer / Install_DIZ-Explorer < prev   
Encoding:
Text File  |  1997-10-17  |  15.8 KB  |  363 lines

  1. ; Installer script for the Diz-Explorer program
  2. ;******************************************************************************
  3. ;     _  _      ____
  4. ;    / \/ \    /___ |   
  5. ;   / /\/\ \     _ ||
  6. ;  / / /\ \ \   |_|||
  7. ; / / /  \ \ \ ____||
  8. ;/_/ /_/\_\ \_\\____|
  9. ;
  10. ; $VER: 2.01_Diz-Explorer_Installer (Jul-08-1997) 
  11. ; If you wish to use any part of this installer you must ask us.
  12. ;
  13. ; Installer    by Jochen Grus & Martin Gentile ©1996, 1997 
  14. ; Diz-Explorer by Jochen Grus ©1997 
  15. ;******************************************************************************
  16.  
  17. ;*** System Stuff ***
  18. (set cpu (database "cpu"))  (set vblank (database "vblank"))
  19. (set graphmem (database "graphics-mem")) (set totmem (database "total-mem"))
  20. (set osver (/ (getversion "LIBS:version.library") 65536))
  21. (if (= vblank "60") ((set blank "NTSC")) ((set blank "PAL")))
  22. (set fastmem (- totmem graphmem))
  23.  
  24. (if (= osver 37) (set workbench "2.0")) (if (= osver 38) (set workbench "2.1"))
  25. (if (= osver 39) (set workbench "3.0")) (if (= osver 40) (set workbench "3.1"))
  26. (if (= osver 41) (set workbench "3.2"))
  27.  
  28. (set cpu (database "cpu"))
  29. (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 1))
  30. (if (= cpu 68020) (set #cpu 2)) (if (= cpu 68030) (set #cpu 3))
  31. (if (= cpu 68040) (set #cpu 4)) 
  32. (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 5) )
  33. (if (> (exists ("sys:libs/ppc.library")) 0) (set #cpu 6) )
  34.  
  35. (if (> cpu 68010)  (set #fpuGuess 0)  (set #fpuGuess 1) )
  36.    
  37. (set vernum1 (getversion "Explorer")) (set ver2 (/ vernum1 65536)) 
  38. (set rev1 (- vernum1 (* ver1 65536) ) ) (set Explorerver (cat ver1 "2." rev1))
  39.  
  40. (if (> (exists ("env:Language")) 0) (set lanfound (getenv "Language")) )
  41. (set lan 0)
  42.  
  43. (if (= "english"     lanfound) (set lan 0))
  44. (if (= "deutsch"     lanfound) (set lan 1))
  45. (if (= "italiano"    lanfound) (set lan 2)) 
  46. (if (= "francais"    lanfound) (set lan 3)) 
  47. (if (= "svenska"     lanfound) (set lan 4)) 
  48. (if (= "norsk"       lanfound) (set lan 5)) 
  49. (if (= "nederlands"  lanfound) (set lan 6)) 
  50. (if (= "dansk"       lanfound) (set lan 7)) 
  51.  
  52. (set #English       "English")
  53. (set #Deutsch       "Deutsch")
  54. (set #Italiano     "Italiano")
  55. (set #Francais     "Francais")
  56. (set #Svenska       "Svenska")
  57. (set #Norsk           "Norsk")
  58. (set #Nederlands "Nederlands")
  59. (set #Dansk           "Dansk")
  60.  
  61. (set mfound 0) (set newicon1 1) 
  62. (set keeper 1) (set firsttime 0)
  63.  
  64. ;***********************************************************************
  65. ; The English Installation Strings
  66. ;***********************************************************************
  67. (set #about (cat "\n\n\n\nWelcome to the Diz-Explorer PRO " Explorerver "\n\n\nCopyright © 1997 by\n\nJochen Grus & Martin Gentile\n") )
  68. (set #aboutpacker (cat "\n\n\n\nNow you should copy all packers to the >C< directory. Before the installation you should check the versions! ") )
  69. (set #aboutlhacheck (cat "\n\n\n\n                - W A R N I N G -               Installation found the following file in the C-directory: LHACHECK. You should delete this file because it has the BBS-Trojan VIRUS!!! ") )
  70. (set #askcpu "\nThe installer has found the following CPU:\n")
  71. (set #askcpu2 "\nThe installer program has found a CPU. The installer should show correctly what kind of cpu is installed...\n")
  72. (set #whereExplorer "Where do you wish to install the Diz-Explorer. A directory called 'Explorer' will be created if one is not there. If a copy of Explorer is found it will be backed up.")
  73. (set #filethere1 "\n\nThe installer has found an Explorer version ")
  74. (set #filethere2 " at ")
  75. (set #filethere3 "\n\nThe file will be renamed to ")
  76. (set #filethere4 " and it will then be moved to ")
  77. (set #backuptoXXX "Back-UP to file named 'Diz-Explorer.")
  78. (set #copyover "Copy Over Old Version")
  79. (set #oktodelete1 "\nIs it ok to delete the older Diz-Explorer binary so that the Explorer Directory can be made?\n")
  80. (set #oktodelete2 "\nIs it ok to delete the older _renamed_ Explorer binary so that the Explorer Directory can be made?\n")
  81. (set #Explorerfound "\nThe Installer has found a copy of Explorer already installed. What do you want to do?\n")
  82. (set #newicon "\nDo you wish to copy over The Diz-Explorer Icon from the archive? If you have any ToolTypes already set you should select no.\n")
  83. (set #nonewicon  "No  - ToolTypes already set.")
  84. (set #yesnewicon "Yes - Copy over the old DIZ-Explorer Icon.")
  85. (set #whatcat "\nSelect the Explorer Language catalog you wish to install.\n")
  86. (set #wherecat "\nWhere do you wish to install the Explorer Language Catalog? There is no need for it yet. Default is ")
  87. (set #catnofind "Can not find this catalog in this Explorer archive. No need for it yet.")
  88. (set #whatdocs "\nWhat Explorer documentation would you like to install?\n")
  89. (set #wheredocs "Where would you like the Explorer documentation you selected to be installed?")
  90. (set #byebye (cat "\nDiz-Explorer Install Complete!\n\n" ))
  91.  
  92.  
  93.  
  94. ;***********************************************************************
  95. ; The German Installation Strings for the Diz-Explorer
  96. ;***********************************************************************
  97.  
  98. (if (= lan 1)
  99. (
  100.  (set po 1)
  101.  
  102. (set #about (cat "\n\n\n\nWillkommen zum DIZ-Explorer PRO " Explorerver "\n\n\nCopyright © 1997 by\n\nJochen Grus & Martin Gentile\n") )
  103. (set #aboutpacker (cat "\n\n\n\nJetzt sollten Sie alle Packer in das >C< Verzeichnis installieren. Man sollte vorher die Versionen überprüfen! Es sind aber alle aktuellen Packer hier vorhanden! ") )
  104. (set #aboutlhacheck (cat "\n\n\n\n                - W A R N U N G -                                                                     Installation hat folgende Datei im C-Verzeichnis gefunden: LHACHECK. Sie sollten diese Datei entfernen, da es den VIRUS BBS-Trojan enthält!!! ") )
  105. (set #askcpu "\nFolgender Prozessor wurde vom Installer erkannt:\n")
  106. (set #askcpu2 "\nDer Installer hat einen Prozessor gefunden. Es müßte den richtigen Typ korrekt erkannt haben \n")
  107. (set #whereExplorer "Wohin wollen Sie den DIZ-Explorer installieren ? Ein Verzeichnis 'Explorer' wird erzeugt, wenn es nicht existiert. Wenn bereits eine Explorer Version vorhanden ist, kann diese gesichert werden.")
  108. (set #filethere1 "\n\nDas Installationsprogramm hat eine Explorer Version gefunden")
  109. (set #filethere2 " at ")
  110. (set #filethere3 "\n\nDie Datei wird umbenannt in ")
  111. (set #filethere4 " und wird dann verschoben nach ")
  112. (set #backuptoXXX "sichern als Datei 'Diz-Explorer.")
  113. (set #copyover "alte Version überschreiben")
  114. (set #oktodelete1 "\nSind Sie damit einverstanden, daß das alte Diz-Explorer Hauptprogramm gelöscht, so daß das Explorer Verzeichnis erstellt werden kann?\n")
  115. (set #oktodelete2 "\nSind Sie damit einverstanden, daß das alte _umbenannte_ Explorer Hauptprogramm gelöscht wird, so daß das Explorer Verzeichnis erstellt werden kann?\n")
  116. (set #Explorerfound "\nDas Installationsprogramm hat bereits eine installierte Explorer Version gefunden. Was wollen Sie tun?\n")
  117. (set #newicon "\nWollen Sie das Diz-Explorer Piktogramm aus dem Archiv übernehmen? Wenn Sie bereits die Programmmerkmale verändert haben, wählen Sie bitte Nein.\n")
  118. (set #nonewicon  "Nein  - Programmmerkmale verändert.")
  119. (set #yesnewicon "Ja - Überschreibe das alte DIZ-Explorer Icon.")
  120. (set #whatcat "\nWählen Sie die Sprache, die installiert werden soll.\n")
  121. (set #wherecat "\nWohin wollen Sie die Explorer Sprachdatei installieren? Wird noch nicht gebraucht. Eingestellt ist ")
  122. (set #catnofind "Ich kann die passende Sprachdatei im Archiv nicht finden. Wird noch nicht gebraucht.")
  123. (set #whatdocs "\nWelche Anleitung zum Explorer wollen Sie installieren ?\n")
  124. (set #wheredocs "Wohin wollen Sie die gewählte Anleitung kopieren?")
  125. (set #byebye (cat "\nDie DIZ-Explorer Installation wurde erfolgreich abgeschlossen!""\n\nViel Spaß beim Entdizzen...\n\n" ))
  126.  
  127. ;***********************************************************************
  128. ; The Italiano Installation Strings
  129. ;***********************************************************************
  130. ;
  131. ;Please make your own Strings for the installation...  Si! I will do it!
  132. ;
  133. ;***********************************************************************
  134. ; The Francais Installation Strings
  135. ;***********************************************************************
  136. ;
  137. ;Please make your own Strings for the installation..  Qui! je vais le faire!
  138. ;
  139. ;***********************************************************************
  140. ; The Svenska Installation Strings
  141. ;***********************************************************************
  142. ;
  143. ;Please make your own Strings for the installation...  Yo! I will do it!
  144. ;
  145. ;***********************************************************************
  146. ; The Norsk Installation Strings
  147. ;***********************************************************************
  148. ;
  149. ;Please make your own Strings for the installation...  Yo! I will do it!
  150. ;
  151. ;***********************************************************************
  152. ; The Nederlands Installation Strings
  153. ;***********************************************************************
  154. ;
  155. ;Please make your own Strings for the installation...  Yo! Ick do dat!
  156. ;
  157. ;***********************************************************************
  158. ; The Dansk Installation Strings
  159. ;***********************************************************************
  160. ;
  161. ;Please make your own Strings for the installation...  Yo! I will do it!
  162. ;
  163.  
  164. )
  165. )
  166.  
  167. ;***********************************************************************
  168. ; Tach Mädelz and Jungz !
  169. ;***********************************************************************
  170. (message #about)
  171. (welcome) 
  172. ;********************************************************************
  173. ; Checking the CPU - Hello CPU are you there???
  174. ;********************************************************************
  175.   (set cpu (database "cpu"))
  176. (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 0))
  177. (if (= cpu 68020) (set #cpu 0)) (if (= cpu 68030) (set #cpu 0))
  178. (if (= cpu 68040) (set #cpu 1)) (if (= cpu 68060) (set #cpu 1)) 
  179. (if (= @installer-version 0)
  180.   (if (> (exists ("sys:libs/68060.library")) 0) (set #cpu 1) )
  181.   (if (= cpu 68060) (set #cpu 1))
  182.   (if (> (exists ("sys:libs/ppc.library")) 0) (set #cpu 2) )
  183.   (if (= cpu 68060) (set #cpu 1))
  184. )
  185.  
  186. (set cpuPick (askchoice (choices "68020 or 68030" "68040 or 68060" "PC603 or PC604")
  187.             (prompt #askcpu)
  188.                     (help   #askcpu2)
  189.                 (default #cpu)
  190.       )
  191. )
  192.  
  193. (if (= cpuPick 0) (set cpuadd ".020")) (if (= cpuPick 1) (set cpuadd ".040")) (if (= cpuPick 2) (set cpuadd ".ppc"))
  194.  
  195. ;***********************************************************************
  196. ; Ask where to put the DIZ-EXPLORER & Make w new directory if needed
  197. ;***********************************************************************
  198. (set Explorerdir  (askdir (prompt #whereExplorer)
  199.                 (help   #whereExplorer)
  200.                     (default "SYS:")
  201.                )  
  202. )
  203.  
  204. (set where Explorerdir)
  205.  
  206. ;***********************************************************************
  207. ; Check to see if the DIZ-EXPLORER is already there, if so ask to backup
  208. ;***********************************************************************
  209. (if (= 1 (exists (tackon where "Explorer") ) ) 
  210.   (
  211.     (set vernum1 (getversion (tackon where "Explorer") ))
  212.     (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  213.     (set Explorer_old (cat ver1 "." rev1))
  214.  
  215.     (message (cat #filethere1 ver1 "." rev1 #filethere2 where #filethere3 
  216.                   (cat "Explorer" Explorer_old) #filethere4 (tackon Explorerdir "Explorer") )
  217.     )
  218.     
  219.  
  220.     (copyfiles (source (tackon where "Explorer"))
  221.                (dest where) 
  222.                (infos)
  223.                (newname (cat "Explorer." Explorer_old))
  224.     )
  225.     
  226.     (delete (tackon Explorerdir "Explorer") (prompt #oktodelete1) (help #oktodelete1) (confirm) (infos)) 
  227.  
  228.     (if (< (exists (tackon Explorerdir "Explorer")) 2) (makedir (tackon Explorerdir "Explorer") (infos)) )    
  229.  
  230.     (copyfiles (source (tackon where (cat "Explorer." Explorer_old) ))
  231.                        (dest (tackon Explorerdir "Explorer")) 
  232.                        (infos)
  233.                
  234.     )
  235.  
  236.     (delete (tackon where (cat "Explorer" Explorer_old)) (prompt #oktodelete2) (help #oktodelete2) (confirm) (infos) ) 
  237.  
  238.     ;(set firsttime 1)
  239.  
  240.   )
  241. )
  242.  
  243. (if (< (exists (tackon Explorerdir "Explorer")) 2) (makedir (tackon Explorerdir "Explorer") (infos)) )
  244. (set where (tackon Explorerdir "Explorer"))
  245. (set @default-dest where)
  246.  
  247. ;********************************************************************
  248. ; Check for the old one and backup it or not...
  249. ;********************************************************************
  250. (if (exists (tackon where "Explorer")) 
  251.   (
  252.       (set vernum1 (getversion (tackon where "Explorer") ))
  253.       (set ver1 (/ vernum1 65536)) (set rev1 (- vernum1 (* ver1 65536) ) )
  254.       (set Explorer_old (cat ver1 "." rev1))
  255.  
  256.       (set keeper  (askchoice (choices  (cat #backuptoXXX Explorer_old "'")  #copyover)
  257.                      (prompt #Explorerfound)
  258.                  (help   #Explorerfound)
  259.                      (default 0)
  260.                )
  261.       )    
  262.  
  263.  
  264.       (if (= keeper 0)
  265.          (copyfiles (source (tackon where "Explorer"))
  266.                      (dest where) 
  267.                      (infos)
  268.                      (newname (cat "Explorer" Explorer_old))
  269.          )
  270.       )          
  271.  
  272.       (set firsttime 1)
  273.     
  274.   )
  275. )
  276.  
  277. ;********************************************************************
  278. ; Copy over the old Explorer file and Icon if wanted (Sure!)
  279. ;********************************************************************
  280. (copyfiles (source "Explorer") (dest where) (optional "nofail") )
  281.  
  282.  
  283. (if (= firsttime 0)  (copyfiles (source "Explorer.info") (dest where) (optional "nofail") ) )
  284.  
  285.  
  286. (if (OR (= keeper 0) (= (exists (tackon where "Explorer.info")) 0))
  287.   (
  288.   
  289.    (set newicon (askchoice (choices #yesnewicon #nonewicon)
  290.                            (prompt #newicon)
  291.                        (help   #newicon)
  292.                            (default 0)
  293.             )
  294.    )
  295.   
  296.    (if (= newicon 0) 
  297.      (copyfiles (source "Explorer.info") (dest where)  (optional "nofail") )
  298.    )
  299.  
  300.   )
  301.  
  302. )
  303.  
  304. ;********************************************************************
  305. ; Select and copy the packers to the C-Directory
  306. ;********************************************************************
  307. (message #aboutpacker)
  308.  
  309.   (
  310.     (copyfiles
  311.       (prompt "Copying the packers")
  312.       (source "c")
  313.       (all)
  314.       (dest "c:")
  315.       (confirm)
  316.       (help 
  317.         "This will copy the packers to the >C< directory. "
  318.         "If you copy it to the SYS:c directory, it will not check if there are newer versions! "
  319.         "Check this out! There is a list of Version-Numbers of the files which are to installed "
  320.       )
  321.     )
  322. )
  323. ;********************************************************************
  324. ; Checking the C-Directory for LhaCheck - Oh no... 
  325. ;********************************************************************
  326.    (if (exists "c:lhacheck")
  327. (message #aboutlhacheck))
  328. ;********************************************************************
  329. ; Ask and copy the documentations if wanted!
  330. ;********************************************************************
  331. (set docs (askoptions (choices " Explorer.guide" " DIZ-Explorer.txt" " Example-Amiga.list" " Example-PC.list")
  332.               (prompt #whatdocs)
  333.                       (help #whatdocs)
  334.       )
  335. )
  336.  
  337. (if (<> docs 0)
  338.  (
  339.    (set docsdir (askdir (prompt #wheredocs)
  340.                (help   #wheredocs)
  341.                    (default where)
  342.                 )  
  343.    )
  344.  
  345.    (if (IN docs 0) (copyfiles (source "Explorer.guide") (dest docsdir) (infos) (optional "nofail") ) )
  346.    (if (IN docs 0) (copyfiles (source "Diz-Explorer.txt") (dest docsdir) (infos) (optional "nofail") ) )
  347.    (if (IN docs 0) (copyfiles (source "Example-Amiga.list") (dest docsdir) (infos) (optional "nofail") ) )
  348.    (if (IN docs 0) (copyfiles (source "Example-PC.list") (dest docsdir) (infos) (optional "nofail") ) )
  349.    (run (cat "run SYS:utilities/AmigaGuide Explorer.guide") )
  350.  
  351.  )
  352.  
  353. )
  354.  
  355.  
  356. ;********************************************************************************
  357. ; Ende - Bye - Fin - Finito - Fuck i must go now - see u in the next whisky bar. 
  358. ;********************************************************************************
  359.  
  360.  
  361. (exit #byebye)
  362.